using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class ICCreditFieldMap : EntityTypeConfiguration<ICCreditField>
    {
        public ICCreditFieldMap()
        {
            // Primary Key
            this.HasKey(t => t.FID);

            // Properties
            this.Property(t => t.FPreFixPara)
                .HasMaxLength(20);

            this.Property(t => t.FCaption)
                .HasMaxLength(255);

            this.Property(t => t.FOperator)
                .HasMaxLength(10);

            this.Property(t => t.FPosition)
                .HasMaxLength(50);

            this.Property(t => t.FFilter)
                .HasMaxLength(255);

            this.Property(t => t.FCaption_Cht)
                .HasMaxLength(255);

            this.Property(t => t.FCaption_En)
                .HasMaxLength(255);

            // Table & Column Mappings
            this.ToTable("ICCreditField");
            this.Property(t => t.FID).HasColumnName("FID");
            this.Property(t => t.FPreFixPara).HasColumnName("FPreFixPara");
            this.Property(t => t.FCaption).HasColumnName("FCaption");
            this.Property(t => t.FBitMask).HasColumnName("FBitMask");
            this.Property(t => t.FOperator).HasColumnName("FOperator");
            this.Property(t => t.FPosition).HasColumnName("FPosition");
            this.Property(t => t.FFilter).HasColumnName("FFilter");
            this.Property(t => t.FCheckType).HasColumnName("FCheckType");
            this.Property(t => t.FDisabled).HasColumnName("FDisabled");
            this.Property(t => t.FCaption_Cht).HasColumnName("FCaption_Cht");
            this.Property(t => t.FCaption_En).HasColumnName("FCaption_En");
            this.Property(t => t.FVisible).HasColumnName("FVisible");
        }
    }
}
